/**
 * <pre>
 * Title: 		Links.java
 * Project: 	MSBASE
 * Author:		pengfangliang
 * Create:	 	2012-12-14 上午11:07:16
 * Copyright: 	Copyright (c) 2012
 * Company:		Shenzhen Helper
 * <pre>
 */
package com.hengpeng.itfinbase.persist;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

import com.hengpeng.common.persist.entity.AbstractTableAutoIdEntity;
import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputPattern;
import com.hengpeng.common.web.annotation.HtmlInputType;

/**
 * <pre>
 *  友情链接
 * </pre>
 * @author zhaojitao
 * @version 1.0, 2015-5-14
 */
@Entity
public class Links extends AbstractTableAutoIdEntity
{
	public static enum LinkType
	{
		LINKS("友情链接"), NAVIGATION("快速导航"), PARTNERS("合作伙伴");

		private String text;

		private LinkType(String text)
		{
			this.text = text;
		}

		public String getText()
		{
			return text;
		}

		public void setText(String text)
		{
			this.text = text;
		}

	}

	public static enum WebType
	{
		COMPANY_PARTNER("公司合作商"), E_COMMERCE("电子商务"), FORUM("论坛类"), LOCAL_NAVIGATION("本站快速导航"), LOTTERY_CENTER("支付提供商"), LOTTERY_NEWS(
				"担保企业"), OTHER("其他类型"), PORTAL("门户网站");

		private String text;

		private WebType(String text)
		{
			this.text = text;
		}

		public String getText()
		{
			return text;
		}

		public void setText(String text)
		{
			this.text = text;
		}

	}

	private static final long serialVersionUID = 1L;

	@HtmlInput(index = 14, label = "审核人", type = HtmlInputType.HIDDEN, nullable = true)
	private String checker;

	@HtmlInput(index = 5, label = "站长E-mail", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.EMAIL, nullable = true)
	private String email;

	@HtmlInput(index = 13, label = "审核状态", type = HtmlInputType.HIDDEN, labelProperty = "text", nullable = true)
	@Enumerated(EnumType.STRING)
	private BoolValue isPass;

	@HtmlInput(index = 11, label = "更新时间", type = HtmlInputType.LABEL, pattern = HtmlInputPattern.DATETIME, format = "yyyy-MM-dd HH:mm", nullable = true)
	private Date lastUpdateTime;

	@HtmlInput(index = 4, label = "网站LOGO", type = HtmlInputType.TEXT, nullable = true)
	private String logo;

	@HtmlInput(index = 2, label = "网站名称", type = HtmlInputType.TEXT, nullable = false)
	private String name;

	@HtmlInput(index = 12, label = "操作员", type = HtmlInputType.LABEL, nullable = true)
	private String operator;

	@HtmlInput(index = 7, label = "站长联系电话", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.NORMAL, nullable = true)
	private String phone;

	@HtmlInput(index = 6, label = "站长QQ", type = HtmlInputType.TEXT, nullable = true)
	private String qq;

	@HtmlInput(index = 3, label = "排列顺序", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.INT, nullable = false)
	private Integer sort;

	@HtmlInput(index = 3, label = "链接位置", type = HtmlInputType.RADIOBOX, labelProperty = "text", nullable = false)
	@Enumerated(EnumType.STRING)
	private LinkType type;

	@HtmlInput(index = 1, label = "网址", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.URL, nullable = false)
	private String url;

	@HtmlInput(index = 9, label = "网站简况", type = HtmlInputType.TEXTAREA, pattern = HtmlInputPattern.NORMAL, nullable = true)
	private String webSummary;

	@HtmlInput(index = 8, label = "网站类型", type = HtmlInputType.SELECT, labelProperty = "text", nullable = false)
	@Enumerated(EnumType.STRING)
	private WebType webType;

	public String getChecker()
	{
		return checker;
	}

	public String getEmail()
	{
		return email;
	}

	public BoolValue getIsPass()
	{
		return isPass;
	}

	public Date getLastUpdateTime()
	{
		return lastUpdateTime;
	}

	public String getLogo()
	{
		return logo;
	}

	public String getName()
	{
		return name;
	}

	public String getOperator()
	{
		return operator;
	}

	public String getPhone()
	{
		return phone;
	}

	public String getQq()
	{
		return qq;
	}

	public Integer getSort()
	{
		return sort;
	}

	public LinkType getType()
	{
		return type;
	}

	public String getUrl()
	{
		return url;
	}

	public String getWebSummary()
	{
		return webSummary;
	}

	public WebType getWebType()
	{
		return webType;
	}

	public void setChecker(String checker)
	{
		this.checker = checker;
	}

	public void setEmail(String email)
	{
		this.email = email;
	}

	public void setIsPass(BoolValue isPass)
	{
		this.isPass = isPass;
	}

	public void setLastUpdateTime(Date lastUpdateTime)
	{
		this.lastUpdateTime = lastUpdateTime;
	}

	public void setLogo(String logo)
	{
		this.logo = logo;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public void setOperator(String operator)
	{
		this.operator = operator;
	}

	public void setPhone(String phone)
	{
		this.phone = phone;
	}

	public void setQq(String qq)
	{
		this.qq = qq;
	}

	public void setSort(Integer sort)
	{
		this.sort = sort;
	}

	public void setType(LinkType type)
	{
		this.type = type;
	}

	public void setUrl(String url)
	{
		this.url = url;
	}

	public void setWebSummary(String webSummary)
	{
		this.webSummary = webSummary;
	}

	public void setWebType(WebType webType)
	{
		this.webType = webType;
	}

}
